REGEXMATCH
The REGEXMATCH
field specifier matches documents where a specified field value (the entire value, not just part of it) matches a regular expression. The regular expression matches field values case-insensitively.
NOTE: This field specifier is optimized for MatchType fields, and ParametricType fields when ParametricNumericMapping is TRUE
.
Format
FieldText=REGEXMATCH{regex}:fields
regex
|
A regular expression. A document is returned only if the entire field value matches the regular expression. |
fields
|
A colon-separated list of field names (there must be no space before or after a colon). A document is returned only if the value in at least one of the fields matches your regular expression. |
Examples
In the following example, the COUNTRY
field must match either "United Kingdom" or "United States".
FieldText=REGEXMATCH{United (Kingdom|States)}:COUNTRY
The query would not match a document if the COUNTRY
field contained the value "The United Kingdom", because the entire value must match the regular expression.
In the following example, the PAGECOUNT
or TOTALPAGES
field must contain either two or three digits.
FieldText=REGEXMATCH{\d\d\d?}:PAGECOUNT:TOTALPAGES